1. Field of the Invention
The present invention relates to a timing pulse generator and particularly to a timing pulse generator in a printing device having a serial print head that moves in a scanning motion to perform a print operation, wherein the timing pulse generator provides a print timing based on the resolution of the printing device. The present invention also relates to printing device provided with such a timing pulse generator.
2. Description of the Prior Art
Conventional serial printers such as that proposed in Japanese Laid-Open Patent Publication HEI-9-136465 include an application specified integrated circuit (ASIC). In order to enable printing at a high resolution independent of CPU calculations, this ASIC calculates a pulse period from pulse signals that are generated based on the velocity of the carriage supporting the print head. Further, the ASIC generates a print timing pulse by dividing the calculated pulse period by a prescribed value corresponding to the printing resolution.
As shown in FIG. 5(A), this conventional device inputs the previous pulse period into the print timing generator circuit (multiplier circuit), which generates a print timing pulse by dividing the pulse period by the prescribed value.
As shown in FIG. 5(B), however, the pulse period corresponding to the velocity of the carriage in this type of serial printer is not uniform, due to speed variations caused by feedback control for the carriage drive motor. Also, when employing an open control carriage driving method, the velocity of the carriage varies subtly due to the effects of mechanical tolerances. As a result, it is not possible to generate an accurate timing pulse from the previous pulse period in this conventional method, due to variations in carriage velocity and the like. Accordingly, this conventional method causes errors in print timing, degrading the dot position accuracy in the carriage scanning direction. This is a particularly serious problem in high-accuracy printing and can result in poor color matching in color printing.
In view of the foregoing, it is an object of the present invention to provide a timing pulse generator capable of generating a highly accurate timing pulse that accounts for speed variations in the moving member; and a printing device provided with this type of timing pulse generator that is capable of performing good quality high-resolution printing.
These and other objects of the present invention will be attained by a timing pulse generator for generating timing pulses in association with movement of a moving, member that is driven to move at a velocity along a prescribed transport path, the timing pulse generator including: a pulse generating circuit that generates pulse signals corresponding to the velocity of the moving member; a timer circuit that sequentially measures pulse periods between two succeedingly occurring pulse signals generated by the pulse generating circuit; a storage circuit that stores a previous pulse period previously measured by the timer circuit and a pulse period immediately before the previous pulse period measured by the timer circuit immediately before the measurement of the previous pulse period; a pulse period estimating circuit that estimates a pulse period corresponding to a current velocity of the moving member based on the previous pulse period and the pulse period immediately before the previous pulse period; and a timing pulse generating circuit that generates timing pulses based on the pulse period estimated by the pulse period estimating circuit in order to provide timings for executing prescribed operations with the moving member.
With this construction, when the moving member is driven to move by a motor, the pulse generating circuit generates a pulse signal corresponding to the velocity of this moving member. The pulse period measuring circuit measures the pulse period corresponding to the velocity of the moving member based on the pulse signals generated by the pulse generating circuit. At least the previous pulse period and the pulse period immediately before the previous pulse period are stored in the first and second storage circuits, respectively. Based on variations in the past pulse periods stored in the first and second storage circuits, the pulse period estimating circuit estimates a pulse period corresponding to the current velocity of the moving member. In other words, the current velocity of the moving member is estimated to take into account variations in its speed based on variations in past pulse periods. Then, based on the pulse period estimated by the pulse period estimating circuit, the timing pulse generating circuit generates a timing pulse to provide a timing for executing prescribed operations with the moving member. Accordingly, it is possible to minimize errors in operation timing by anticipating control speed variations caused by feed back control and mechanical speed variations in open control and by controlling the timing of prescribed operations accordingly.
In the embodiment of the present invention, the pulse period estimating circuit includes a subtracting circuit that calculates a value by subtracting the pulse period immediately before the previous pulse period from the previous pulse period; and an adding circuit that adds the value calculated by the subtracting circuit to the previous pulse period stored in the first storage circuit to provide an estimated pulse period. The timing pulse generating circuit generates the timing pulse by dividing the estimated pulse period by a prescribed value.
With this construction, the subtracting circuit calculates a value corresponding to the degree of acceleration or deceleration of the moving member by subtracting the pulse period immediately before the previous pulse period from the previous pulse period. The adding circuit calculates an estimated pulse period to be measured next, that is, the pulse period corresponding to the current velocity of the moving member, by adding the calculated value corresponding to the degree of acceleration or deceleration of the moving member to the previous pulse period. Next, the timing pulse generating circuit generates a timing pulse by dividing the estimated pulse period calculated by the adding circuit by a prescribed value. As a result, it is possible to generate a timing pulse that appropriately estimates variations in the velocity of the moving member, enabling accurate timing of prescribed movements of the moving member.
According to another aspect of the present invention, there is provided a timing pulse generator that includes: an encoder element that outputs an encoder signal having a level varied according to an amount of movement by a moving member; an edge detection circuit that receives the encoder signal from the encoder element and outputs a pulse signal when an edge indicating a change in the level is detected; a timer circuit that outputs an accumulated counter value and resets and starts itself based on the pulse signal output by the edge detection circuit; a first storage circuit that outputs a currently stored counter value and resets itself based on the pulse signal output by the edge detection circuit and that overwrites storage contents with the counter value output from the timer circuit; a second storage circuit that outputs a currently stored counter value and resets itself based on the pulse signal output by the edge detection circuit and that overwrites storage contents with the counter value output from the first storage circuit; a subtraction circuit that receives as input the counter values output from the first storage circuit and the second storage circuit and that outputs a difference value calculated by subtracting the counter value output from the second storage circuit from the counter value output from the first storage circuit; an addition circuit that receives as input the difference value output from the subtraction circuit and the counter value output from the first storage circuit and that outputs a counter value calculated by adding these two values; and a timing pulse generating circuit that generates a timing pulse to apply a timing to the moving member in order to execute prescribed operations.
With this construction, when the motor drives the moving member to move, the encoder element outputs an encoder signal that changes according to the amount of movement. When the edge detection circuit detects a rising or falling edge of this encoder signal, the edge detection circuit outputs a pulse signal. This pulse signal functions as a reset signal for the timer circuit and first and second storage circuits. When a pulse signal from the edge detection circuit is input into the timer circuit, the timer circuit resets and starts over, outputting the counter value stored up to that point. This counter value, which signifies a pulse period corresponding to the velocity of the moving member, is input into the first storage circuit. Upon receiving a pulse signal from the edge detection circuit, the first storage circuit resets; outputs the stored counter value previously input from the timer circuit; and rewrites the storage area with the new counter value input from the timer circuit. In this way, the counter value output from the first storage circuit (equivalent to the previous pulse period) is input into the second storage circuit, subtraction circuit, and addition circuit. Upon receiving a pulse signal from the edge detection circuit, the second storage circuit resets; outputs the stored counter value previously input from the first storage circuit (equivalent to the pulse period immediately before the previous pulse period); and rewrites the storage area with the new counter value input from the first storage circuit. At this time, the counter value corresponding to the pulse period immediately before the previous pulse period that was output from the second storage circuit is input into the subtraction circuit.
Hence, each time the edge detection circuit generates a pulse signal, counters output from the first and second storage circuits and corresponding to the previous pulse period and the pulse period immediately before the previous pulse period are input into the subtraction circuit. The subtraction circuit calculates the difference between these counter values by subtracting the counter value corresponding to the pulse period immediately before the previous pulse period from the counter value corresponding to the previous pulse period, and outputs this difference value to the addition circuit. As a result, every time the edge detection circuit generates a pulse signal, the counter value corresponding to the previous pulse period and the value for the difference between the previous pulse period and the pulse period immediately before the previous pulse period are input into the addition circuit. The addition circuit adds these two values and outputs the result as a pulse period corresponding to the current movement speed of the moving member. The counter value output from the addition circuit is input into the timing pulse generating circuit. The timing pulse generating circuit divides the counter value by a prescribed value and issues the result as a timing pulse. This timing pulse is a timing signal that is an accurate estimation of the current velocity of the moving member. Hence, it is possible to execute prescribed operations with the moving member at a very precise timing.
It is preferable to use the timing pulse generator in an ink jet printer having a print head which corresponds to the moving member. The print head moves in the widthwise direction of a recording paper. The timing pulse generator further includes a print head driving control circuit that applies a timing to perform print operations with the print head based on the timing pulse generated by the timing pulse generator.
With this construction, it is possible to accurately estimate the pulse period corresponding to the current velocity of the print head and to increase printing quality for high resolution printing, even when the velocity of the print head varies subtly due to feedback control or mechanical factor in open control.